<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998


@Uniques@ are used to distinguish entities in the compiler (@Ids@,
@Classes@, etc.) from each other.  Thus, @Uniques@ are the basic
comparison key in the compiler.

If there is any single operation that needs to be fast, it is @Unique@

comparison.  Unsurprisingly, there is quite a bit of huff-and-puff
directed to that end.

Some of the other hair in this code is to be able to use a
``splittable @UniqueSupply@'' if requested/possible (not standard
Haskell).
-}</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-pragma">{-# LANGUAGE CPP, BangPatterns, MagicHash #-}</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Types.Unique</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Main data types</span></span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier">Unique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier">Uniquable</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#uNIQUE_BITS"><span class="hs-identifier">uNIQUE_BITS</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Constructors, destructors and operations on 'Unique's</span></span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#hasKey"><span class="hs-identifier">hasKey</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier">pprUniqueAlways</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkUniqueGrimily"><span class="hs-identifier">mkUniqueGrimily</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#getKey"><span class="hs-identifier">getKey</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier">mkUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#unpkUnique"><span class="hs-identifier">unpkUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#eqUnique"><span class="hs-identifier">eqUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#ltUnique"><span class="hs-identifier">ltUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#incrUnique"><span class="hs-identifier">incrUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#newTagUnique"><span class="hs-identifier">newTagUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#initTyVarUnique"><span class="hs-identifier">initTyVarUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#initExitJoinUnique"><span class="hs-identifier">initExitJoinUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier">nonDetCmpUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#isValidKnownKeyUnique"><span class="hs-identifier">isValidKnownKeyUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Making built-in uniques</span></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>        </span><span class="hs-comment">-- now all the built-in GHC.Types.Uniques (and functions to make them)</span><span>
</span><span id="line-47"></span><span>        </span><span class="hs-comment">-- [the Oh-So-Wonderful Haskell module system wins again...]</span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkAlphaTyVarUnique"><span class="hs-identifier">mkAlphaTyVarUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkPrimOpIdUnique"><span class="hs-identifier">mkPrimOpIdUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkPrimOpWrapperUnique"><span class="hs-identifier">mkPrimOpWrapperUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeMiscIdUnique"><span class="hs-identifier">mkPreludeMiscIdUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeDataConUnique"><span class="hs-identifier">mkPreludeDataConUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeTyConUnique"><span class="hs-identifier">mkPreludeTyConUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeClassUnique"><span class="hs-identifier">mkPreludeClassUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkCoVarUnique"><span class="hs-identifier">mkCoVarUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkVarOccUnique"><span class="hs-identifier">mkVarOccUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkDataOccUnique"><span class="hs-identifier">mkDataOccUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkTvOccUnique"><span class="hs-identifier">mkTvOccUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkTcOccUnique"><span class="hs-identifier">mkTcOccUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkRegSingleUnique"><span class="hs-identifier">mkRegSingleUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkRegPairUnique"><span class="hs-identifier">mkRegPairUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkRegClassUnique"><span class="hs-identifier">mkRegClassUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkRegSubUnique"><span class="hs-identifier">mkRegSubUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkCostCentreUnique"><span class="hs-identifier">mkCostCentreUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkBuiltinUnique"><span class="hs-identifier">mkBuiltinUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkPseudoUniqueD"><span class="hs-identifier">mkPseudoUniqueD</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkPseudoUniqueE"><span class="hs-identifier">mkPseudoUniqueE</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkPseudoUniqueH"><span class="hs-identifier">mkPseudoUniqueH</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Deriving uniques</span></span><span>
</span><span id="line-64"></span><span>        </span><span class="annot"><span class="hs-comment">-- *** From TyCon name uniques</span></span><span>
</span><span id="line-65"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#tyConRepNameUnique"><span class="hs-identifier">tyConRepNameUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>        </span><span class="annot"><span class="hs-comment">-- *** From DataCon name uniques</span></span><span>
</span><span id="line-67"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#dataConWorkerUnique"><span class="hs-identifier">dataConWorkerUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#dataConTyRepNameUnique"><span class="hs-identifier">dataConTyRepNameUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Local uniques</span></span><span>
</span><span id="line-70"></span><span>        </span><span class="hs-comment">-- | These are exposed exclusively for use by 'GHC.Types.Var.Env.uniqAway', which</span><span>
</span><span id="line-71"></span><span>        </span><span class="hs-comment">-- has rather peculiar needs. See Note [Local uniques].</span><span>
</span><span id="line-72"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.html#mkLocalUnique"><span class="hs-identifier">mkLocalUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#minLocalUnique"><span class="hs-identifier">minLocalUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#maxLocalUnique"><span class="hs-identifier">maxLocalUnique</span></a></span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span class="hs-cpp">#include &quot;Unique.h&quot;
</span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- just for implementing a fast [0,61) -&gt; Char function</span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exts.html#"><span class="hs-identifier">GHC.Exts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier">indexCharOffAddr#</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier">Char</span></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier">Int</span></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Char.html#chr"><span class="hs-identifier">chr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier">ord</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Unique-type]{@Unique@ type and operations}
*                                                                      *
************************************************************************

The @Chars@ are ``tag letters'' that identify the @UniqueSupply@.
Fast comparison is everything on @Uniques@:
-}</span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-comment">-- | Unique identifier.</span><span>
</span><span id="line-103"></span><span class="hs-comment">--</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- The type of unique identifiers that are used in many places in GHC</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- for fast ordering and equality tests. You should generate these with</span><span>
</span><span id="line-106"></span><span class="hs-comment">-- the functions from the 'UniqSupply' module</span><span>
</span><span id="line-107"></span><span class="hs-comment">--</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- These are sometimes also referred to as \&quot;keys\&quot; in comments in GHC.</span><span>
</span><span id="line-109"></span><span class="hs-keyword">newtype</span><span> </span><span id="Unique"><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-var">Unique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MkUnique"><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-var">MkUnique</span></a></span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#uNIQUE_BITS"><span class="hs-pragma hs-type">uNIQUE_BITS</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-112"></span><span class="annot"><a href="GHC.Types.Unique.html#uNIQUE_BITS"><span class="hs-identifier hs-type">uNIQUE_BITS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-113"></span><span id="uNIQUE_BITS"><span class="annot"><span class="annottext">uNIQUE_BITS :: Int
</span><a href="GHC.Types.Unique.html#uNIQUE_BITS"><span class="hs-identifier hs-var hs-var">uNIQUE_BITS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall b. FiniteBits b =&gt; b -&gt; Int
</span><a href="../../base/src/Data.Bits.html#finiteBitSize"><span class="hs-identifier hs-var">finiteBitSize</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="hs-identifier">UNIQUE_TAG_BITS</span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="hs-comment">{-
Now come the functions which construct uniques from their pieces, and vice versa.
The stuff about unique *supplies* is handled further down this module.
-}</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="annot"><a href="GHC.Types.Unique.html#unpkUnique"><span class="hs-identifier hs-type">unpkUnique</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>        </span><span class="hs-comment">-- The reverse</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="annot"><a href="GHC.Types.Unique.html#mkUniqueGrimily"><span class="hs-identifier hs-type">mkUniqueGrimily</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>                </span><span class="hs-comment">-- A trap-door for UniqSupply</span><span>
</span><span id="line-123"></span><span class="annot"><a href="GHC.Types.Unique.html#getKey"><span class="hs-identifier hs-type">getKey</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>                </span><span class="hs-comment">-- for Var</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="annot"><a href="GHC.Types.Unique.html#incrUnique"><span class="hs-identifier hs-type">incrUnique</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-126"></span><span class="annot"><a href="GHC.Types.Unique.html#stepUnique"><span class="hs-identifier hs-type">stepUnique</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Types.Unique.html#newTagUnique"><span class="hs-identifier hs-type">newTagUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span id="mkUniqueGrimily"><span class="annot"><span class="annottext">mkUniqueGrimily :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUniqueGrimily"><span class="hs-identifier hs-var hs-var">mkUniqueGrimily</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-var">MkUnique</span></a></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#getKey"><span class="hs-pragma hs-type">getKey</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-132"></span><span id="getKey"><span class="annot"><span class="annottext">getKey :: Unique -&gt; Int
</span><a href="GHC.Types.Unique.html#getKey"><span class="hs-identifier hs-var hs-var">getKey</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796154"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796154"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796154"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span id="incrUnique"><span class="annot"><span class="annottext">incrUnique :: Unique -&gt; Unique
</span><a href="GHC.Types.Unique.html#incrUnique"><span class="hs-identifier hs-var hs-var">incrUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796153"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796153"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-var">MkUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796153"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span id="stepUnique"><span class="annot"><span class="annottext">stepUnique :: Unique -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#stepUnique"><span class="hs-identifier hs-var hs-var">stepUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796151"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796151"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680796150"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796150"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-var">MkUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796151"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796150"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span class="annot"><a href="GHC.Types.Unique.html#mkLocalUnique"><span class="hs-identifier hs-type">mkLocalUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-138"></span><span id="mkLocalUnique"><span class="annot"><span class="annottext">mkLocalUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkLocalUnique"><span class="hs-identifier hs-var hs-var">mkLocalUnique</span></a></span></span><span> </span><span id="local-6989586621680796149"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796149"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'X'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796149"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="annot"><a href="GHC.Types.Unique.html#minLocalUnique"><span class="hs-identifier hs-type">minLocalUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-141"></span><span id="minLocalUnique"><span class="annot"><span class="annottext">minLocalUnique :: Unique
</span><a href="GHC.Types.Unique.html#minLocalUnique"><span class="hs-identifier hs-var hs-var">minLocalUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkLocalUnique"><span class="hs-identifier hs-var">mkLocalUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-142"></span><span>
</span><span id="line-143"></span><span class="annot"><a href="GHC.Types.Unique.html#maxLocalUnique"><span class="hs-identifier hs-type">maxLocalUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-144"></span><span id="maxLocalUnique"><span class="annot"><span class="annottext">maxLocalUnique :: Unique
</span><a href="GHC.Types.Unique.html#maxLocalUnique"><span class="hs-identifier hs-var hs-var">maxLocalUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkLocalUnique"><span class="hs-identifier hs-var">mkLocalUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Types.Unique.html#uniqueMask"><span class="hs-identifier hs-var">uniqueMask</span></a></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="hs-comment">-- newTagUnique changes the &quot;domain&quot; of a unique to a different char</span><span>
</span><span id="line-147"></span><span id="newTagUnique"><span class="annot"><span class="annottext">newTagUnique :: Unique -&gt; Char -&gt; Unique
</span><a href="GHC.Types.Unique.html#newTagUnique"><span class="hs-identifier hs-var hs-var">newTagUnique</span></a></span></span><span> </span><span id="local-6989586621680796147"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796147"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621680796146"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796146"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796146"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796145"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621680796145"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796145"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; (Char, Int)
</span><a href="GHC.Types.Unique.html#unpkUnique"><span class="hs-identifier hs-var">unpkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796147"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="hs-comment">-- | How many bits are devoted to the unique index (as opposed to the class</span><span>
</span><span id="line-150"></span><span class="hs-comment">-- character).</span><span>
</span><span id="line-151"></span><span class="annot"><a href="GHC.Types.Unique.html#uniqueMask"><span class="hs-identifier hs-type">uniqueMask</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-152"></span><span id="uniqueMask"><span class="annot"><span class="annottext">uniqueMask :: Int
</span><a href="GHC.Types.Unique.html#uniqueMask"><span class="hs-identifier hs-var hs-var">uniqueMask</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Types.Unique.html#uNIQUE_BITS"><span class="hs-identifier hs-var">uNIQUE_BITS</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="hs-comment">-- pop the Char in the top 8 bits of the Unique(Supply)</span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span class="hs-comment">-- No 64-bit bugs here, as long as we have at least 32 bits. --JSM</span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- and as long as the Char fits in 8 bits, which we assume anyway!</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="annot"><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-type">mkUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>       </span><span class="hs-comment">-- Builds a unique from pieces</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- NOT EXPORTED, so that we can see all the Chars that</span><span>
</span><span id="line-162"></span><span class="hs-comment">--               are used in this one module</span><span>
</span><span id="line-163"></span><span id="mkUnique"><span class="annot"><span class="annottext">mkUnique :: Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var hs-var">mkUnique</span></a></span></span><span> </span><span id="local-6989586621680796143"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796143"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621680796142"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796142"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-164"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-var">MkUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796141"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796139"><span class="hs-identifier hs-var">bits</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-166"></span><span>    </span><span id="local-6989586621680796141"><span class="annot"><span class="annottext">tag :: Int
</span><a href="#local-6989586621680796141"><span class="hs-identifier hs-var hs-var">tag</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796143"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Types.Unique.html#uNIQUE_BITS"><span class="hs-identifier hs-var">uNIQUE_BITS</span></a></span><span>
</span><span id="line-167"></span><span>    </span><span id="local-6989586621680796139"><span class="annot"><span class="annottext">bits :: Int
</span><a href="#local-6989586621680796139"><span class="hs-identifier hs-var hs-var">bits</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796142"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Types.Unique.html#uniqueMask"><span class="hs-identifier hs-var">uniqueMask</span></a></span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span id="unpkUnique"><span class="annot"><span class="annottext">unpkUnique :: Unique -&gt; (Char, Int)
</span><a href="GHC.Types.Unique.html#unpkUnique"><span class="hs-identifier hs-var hs-var">unpkUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796135"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796135"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-171"></span><span>        </span><span class="hs-comment">-- as long as the Char may have its eighth bit set, we</span><span>
</span><span id="line-172"></span><span>        </span><span class="hs-comment">-- really do need the logical right-shift here!</span><span>
</span><span id="line-173"></span><span>        </span><span id="local-6989586621680796133"><span class="annot"><span class="annottext">tag :: Char
</span><a href="#local-6989586621680796133"><span class="hs-identifier hs-var hs-var">tag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="../../base/src/GHC.Char.html#chr"><span class="hs-identifier hs-var">chr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796135"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Types.Unique.html#uNIQUE_BITS"><span class="hs-identifier hs-var">uNIQUE_BITS</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>        </span><span id="local-6989586621680796130"><span class="annot"><span class="annottext">i :: Int
</span><a href="#local-6989586621680796130"><span class="hs-identifier hs-var hs-var">i</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796135"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.Types.Unique.html#uniqueMask"><span class="hs-identifier hs-var">uniqueMask</span></a></span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-keyword">in</span><span>
</span><span id="line-176"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796133"><span class="hs-identifier hs-var">tag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796130"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="hs-comment">-- | The interface file symbol-table encoding assumes that known-key uniques fit</span><span>
</span><span id="line-179"></span><span class="hs-comment">-- in 30-bits; verify this.</span><span>
</span><span id="line-180"></span><span class="hs-comment">--</span><span>
</span><span id="line-181"></span><span class="hs-comment">-- See Note [Symbol table representation of names] in &quot;GHC.Iface.Binary&quot; for details.</span><span>
</span><span id="line-182"></span><span class="annot"><a href="GHC.Types.Unique.html#isValidKnownKeyUnique"><span class="hs-identifier hs-type">isValidKnownKeyUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-183"></span><span id="isValidKnownKeyUnique"><span class="annot"><span class="annottext">isValidKnownKeyUnique :: Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#isValidKnownKeyUnique"><span class="hs-identifier hs-var hs-var">isValidKnownKeyUnique</span></a></span></span><span> </span><span id="local-6989586621680796129"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796129"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-184"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; (Char, Int)
</span><a href="GHC.Types.Unique.html#unpkUnique"><span class="hs-identifier hs-var">unpkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796129"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-185"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680796128"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796128"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680796127"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796127"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796128"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xff</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796127"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">22</span></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Uniquable-class]{The @Uniquable@ class}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="hs-comment">-- | Class of things that we can obtain a 'Unique' from</span><span>
</span><span id="line-196"></span><span class="hs-keyword">class</span><span> </span><span id="Uniquable"><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-var">Uniquable</span></a></span></span><span> </span><span id="local-6989586621680796255"><span class="annot"><a href="#local-6989586621680796255"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-197"></span><span>    </span><span id="getUnique"><span class="annot"><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-type">getUnique</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680796255"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span id="local-6989586621680796258"><span class="annot"><a href="GHC.Types.Unique.html#hasKey"><span class="hs-identifier hs-type">hasKey</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680796258"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680796258"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-200"></span><span id="local-6989586621680796118"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680796118"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="hasKey"><span class="annot"><span class="annottext">hasKey :: forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var hs-var">`hasKey`</span></a></span></span><span> </span><span id="local-6989586621680796117"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796117"><span class="hs-identifier hs-var">k</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680796118"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796117"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-203"></span><span> </span><span id="local-6989586621680796113"><span class="annot"><span class="annottext">getUnique :: FastString -&gt; Unique
</span><a href="#local-6989586621680796113"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span id="local-6989586621680796112"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796112"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUniqueGrimily"><span class="hs-identifier hs-var">mkUniqueGrimily</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Int
</span><a href="GHC.Data.FastString.html#uniqueOfFS"><span class="hs-identifier hs-var">uniqueOfFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796112"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-206"></span><span> </span><span id="local-6989586621680796108"><span class="annot"><span class="annottext">getUnique :: Int -&gt; Unique
</span><a href="#local-6989586621680796108"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span id="local-6989586621680796107"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796107"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUniqueGrimily"><span class="hs-identifier hs-var">mkUniqueGrimily</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796107"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Unique-instances]{Instance declarations for @Unique@}
*                                                                      *
************************************************************************

And the whole point (besides uniqueness) is fast equality.  We don't
use `deriving' because we want {\em precise} control of ordering
(equality on @Uniques@ is v common).
-}</span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-comment">-- Note [Unique Determinism]</span><span>
</span><span id="line-221"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-222"></span><span class="hs-comment">-- The order of allocated @Uniques@ is not stable across rebuilds.</span><span>
</span><span id="line-223"></span><span class="hs-comment">-- The main reason for that is that typechecking interface files pulls</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- @Uniques@ from @UniqSupply@ and the interface file for the module being</span><span>
</span><span id="line-225"></span><span class="hs-comment">-- currently compiled can, but doesn't have to exist.</span><span>
</span><span id="line-226"></span><span class="hs-comment">--</span><span>
</span><span id="line-227"></span><span class="hs-comment">-- It gets more complicated if you take into account that the interface</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- files are loaded lazily and that building multiple files at once has to</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- work for any subset of interface files present. When you add parallelism</span><span>
</span><span id="line-230"></span><span class="hs-comment">-- this makes @Uniques@ hopelessly random.</span><span>
</span><span id="line-231"></span><span class="hs-comment">--</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- As such, to get deterministic builds, the order of the allocated</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- @Uniques@ should not affect the final result.</span><span>
</span><span id="line-234"></span><span class="hs-comment">-- see also wiki/deterministic-builds</span><span>
</span><span id="line-235"></span><span class="hs-comment">--</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- Note [Unique Determinism and code generation]</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-238"></span><span class="hs-comment">-- The goal of the deterministic builds (wiki/deterministic-builds, #4012)</span><span>
</span><span id="line-239"></span><span class="hs-comment">-- is to get ABI compatible binaries given the same inputs and environment.</span><span>
</span><span id="line-240"></span><span class="hs-comment">-- The motivation behind that is that if the ABI doesn't change the</span><span>
</span><span id="line-241"></span><span class="hs-comment">-- binaries can be safely reused.</span><span>
</span><span id="line-242"></span><span class="hs-comment">-- Note that this is weaker than bit-for-bit identical binaries and getting</span><span>
</span><span id="line-243"></span><span class="hs-comment">-- bit-for-bit identical binaries is not a goal for now.</span><span>
</span><span id="line-244"></span><span class="hs-comment">-- This means that we don't care about nondeterminism that happens after</span><span>
</span><span id="line-245"></span><span class="hs-comment">-- the interface files are created, in particular we don't care about</span><span>
</span><span id="line-246"></span><span class="hs-comment">-- register allocation and code generation.</span><span>
</span><span id="line-247"></span><span class="hs-comment">-- To track progress on bit-for-bit determinism see #12262.</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span class="annot"><a href="GHC.Types.Unique.html#eqUnique"><span class="hs-identifier hs-type">eqUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-250"></span><span id="eqUnique"><span class="annot"><span class="annottext">eqUnique :: Unique -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#eqUnique"><span class="hs-identifier hs-var hs-var">eqUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796106"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796106"><span class="hs-identifier hs-var">u1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796105"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796105"><span class="hs-identifier hs-var">u2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796106"><span class="hs-identifier hs-var">u1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796105"><span class="hs-identifier hs-var">u2</span></a></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="annot"><a href="GHC.Types.Unique.html#ltUnique"><span class="hs-identifier hs-type">ltUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-253"></span><span id="ltUnique"><span class="annot"><span class="annottext">ltUnique :: Unique -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#ltUnique"><span class="hs-identifier hs-var hs-var">ltUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796104"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796104"><span class="hs-identifier hs-var">u1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796103"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796103"><span class="hs-identifier hs-var">u2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796104"><span class="hs-identifier hs-var">u1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796103"><span class="hs-identifier hs-var">u2</span></a></span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span class="hs-comment">-- Provided here to make it explicit at the call-site that it can</span><span>
</span><span id="line-256"></span><span class="hs-comment">-- introduce non-determinism.</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- See Note [Unique Determinism]</span><span>
</span><span id="line-258"></span><span class="hs-comment">-- See Note [No Ord for Unique]</span><span>
</span><span id="line-259"></span><span class="annot"><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-type">nonDetCmpUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-260"></span><span id="nonDetCmpUnique"><span class="annot"><span class="annottext">nonDetCmpUnique :: Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-identifier hs-var hs-var">nonDetCmpUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796102"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796102"><span class="hs-identifier hs-var">u1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#MkUnique"><span class="hs-identifier hs-type">MkUnique</span></a></span><span> </span><span id="local-6989586621680796101"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796101"><span class="hs-identifier hs-var">u2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-261"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796102"><span class="hs-identifier hs-var">u1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796101"><span class="hs-identifier hs-var">u2</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796102"><span class="hs-identifier hs-var">u1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796101"><span class="hs-identifier hs-var">u2</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="hs-comment">{-
Note [No Ord for Unique]
~~~~~~~~~~~~~~~~~~~~~~~~~~
As explained in Note [Unique Determinism] the relative order of Uniques
is nondeterministic. To prevent from accidental use the Ord Unique
instance has been removed.
This makes it easier to maintain deterministic builds, but comes with some
drawbacks.
The biggest drawback is that Maps keyed by Uniques can't directly be used.
The alternatives are:

  1) Use UniqFM or UniqDFM, see Note [Deterministic UniqFM] to decide which
  2) Create a newtype wrapper based on Unique ordering where nondeterminism
     is controlled. See Module.ModuleEnv
  3) Change the algorithm to use nonDetCmpUnique and document why it's still
     deterministic
  4) Use TrieMap as done in GHC.Cmm.CommonBlockElim.groupByLabel
-}</span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-283"></span><span>    </span><span id="local-6989586621680796097"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796097"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680796096"><span class="annot"><span class="annottext">== :: Unique -&gt; Unique -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></span></span><span> </span><span id="local-6989586621680796095"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796095"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#eqUnique"><span class="hs-identifier hs-var">eqUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796097"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796095"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-284"></span><span>    </span><span id="local-6989586621680796094"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796094"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680796093"><span class="annot"><span class="annottext">/= :: Unique -&gt; Unique -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">/=</span></span></span><span> </span><span id="local-6989586621680796091"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796091"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#eqUnique"><span class="hs-identifier hs-var">eqUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796094"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796091"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-285"></span><span>
</span><span id="line-286"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-287"></span><span>    </span><span id="local-6989586621680796087"><span class="annot"><span class="annottext">getUnique :: Unique -&gt; Unique
</span><a href="#local-6989586621680796087"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span id="local-6989586621680796086"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796086"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796086"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="hs-comment">-- We do sometimes make strings with @Uniques@ in them:</span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span class="annot"><a href="GHC.Types.Unique.html#showUnique"><span class="hs-identifier hs-type">showUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-292"></span><span id="showUnique"><span class="annot"><span class="annottext">showUnique :: Unique -&gt; String
</span><a href="GHC.Types.Unique.html#showUnique"><span class="hs-identifier hs-var hs-var">showUnique</span></a></span></span><span> </span><span id="local-6989586621680796084"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796084"><span class="hs-identifier hs-var">uniq</span></a></span></span><span>
</span><span id="line-293"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; (Char, Int)
</span><a href="GHC.Types.Unique.html#unpkUnique"><span class="hs-identifier hs-var">unpkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796084"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-294"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680796083"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796083"><span class="hs-identifier hs-var">tag</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680796082"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796082"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; String -&gt; String
</span><a href="GHC.Types.Unique.html#finish_show"><span class="hs-identifier hs-var">finish_show</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796083"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796082"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String
</span><a href="GHC.Types.Unique.html#iToBase62"><span class="hs-identifier hs-var">iToBase62</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796082"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span class="annot"><a href="GHC.Types.Unique.html#finish_show"><span class="hs-identifier hs-type">finish_show</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-297"></span><span id="finish_show"><span class="annot"><span class="annottext">finish_show :: Char -&gt; Int -&gt; String -&gt; String
</span><a href="GHC.Types.Unique.html#finish_show"><span class="hs-identifier hs-var hs-var">finish_show</span></a></span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'t'</span></span><span> </span><span id="local-6989586621680796079"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796079"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621680796078"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680796078"><span class="hs-identifier hs-var">_pp_u</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796079"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">26</span></span><span>
</span><span id="line-298"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-comment">-- Special case to make v common tyvars, t1, t2, ...</span><span>
</span><span id="line-299"></span><span>    </span><span class="hs-comment">-- come out as a, b, ... (shorter, easier to read)</span><span>
</span><span id="line-300"></span><span>    </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="../../base/src/GHC.Char.html#chr"><span class="hs-identifier hs-var">chr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'a'</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796079"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-301"></span><span class="annot"><a href="GHC.Types.Unique.html#finish_show"><span class="hs-identifier hs-var">finish_show</span></a></span><span> </span><span id="local-6989586621680796077"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796077"><span class="hs-identifier hs-var">tag</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680796076"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680796076"><span class="hs-identifier hs-var">pp_u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796077"><span class="hs-identifier hs-var">tag</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680796076"><span class="hs-identifier hs-var">pp_u</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-type">pprUniqueAlways</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-304"></span><span class="hs-comment">-- The &quot;always&quot; means regardless of -dsuppress-uniques</span><span>
</span><span id="line-305"></span><span class="hs-comment">-- It replaces the old pprUnique to remind callers that</span><span>
</span><span id="line-306"></span><span class="hs-comment">-- they should consider whether they want to consult</span><span>
</span><span id="line-307"></span><span class="hs-comment">-- Opt_SuppressUniques</span><span>
</span><span id="line-308"></span><span id="pprUniqueAlways"><span class="annot"><span class="annottext">pprUniqueAlways :: Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var hs-var">pprUniqueAlways</span></a></span></span><span> </span><span id="local-6989586621680796075"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796075"><span class="hs-identifier hs-var">u</span></a></span></span><span>
</span><span id="line-309"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; String
</span><a href="GHC.Types.Unique.html#showUnique"><span class="hs-identifier hs-var">showUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796075"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680796071"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-312"></span><span>    </span><span id="local-6989586621680796069"><span class="annot"><span class="annottext">ppr :: Unique -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680796063"><span id="local-6989586621680796066"><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-315"></span><span>    </span><span id="local-6989586621680796061"><span class="annot"><span class="annottext">show :: Unique -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var hs-var hs-var hs-var">show</span></a></span></span><span> </span><span id="local-6989586621680796059"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796059"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; String
</span><a href="GHC.Types.Unique.html#showUnique"><span class="hs-identifier hs-var">showUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796059"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Utils-base62]{Base-62 numbers}
*                                                                      *
************************************************************************

A character-stingy way to read/write numbers (notably Uniques).
The ``62-its'' are \tr{[0-9a-zA-Z]}.  We don't handle negative Ints.
Code stolen from Lennart.
-}</span><span>
</span><span id="line-328"></span><span>
</span><span id="line-329"></span><span class="annot"><a href="GHC.Types.Unique.html#iToBase62"><span class="hs-identifier hs-type">iToBase62</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-330"></span><span id="iToBase62"><span class="annot"><span class="annottext">iToBase62 :: Int -&gt; String
</span><a href="GHC.Types.Unique.html#iToBase62"><span class="hs-identifier hs-var hs-var">iToBase62</span></a></span></span><span> </span><span id="local-6989586621680796058"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796058"><span class="hs-identifier hs-var">n_</span></a></span></span><span>
</span><span id="line-331"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span class="hs-identifier">n_</span><span> </span><span class="hs-operator">&gt;=</span><span> </span><span class="hs-number">0</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">n_</span><span> </span><span class="hs-string">&quot;&quot;</span><span>
</span><span id="line-332"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-333"></span><span>    </span><span id="local-6989586621680796055"><span class="annot"><span class="annottext">go :: Int -&gt; String -&gt; String
</span><a href="#local-6989586621680796055"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680796052"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796052"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680796051"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680796051"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796052"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">62</span></span><span>
</span><span id="line-334"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680796050"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621680796050"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="#local-6989586621680796049"><span class="hs-identifier hs-var">chooseChar62</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796052"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796050"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680796051"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-335"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-336"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String
</span><a href="#local-6989586621680796055"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796048"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680796047"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680796051"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">!</span><span id="local-6989586621680796048"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796048"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680796043"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796043"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; (Int, Int)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="../../base/src/GHC.Real.html#quotRem"><span class="hs-identifier hs-var">quotRem</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796052"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">62</span></span><span>
</span><span id="line-337"></span><span>                                  </span><span class="hs-glyph">!</span><span id="local-6989586621680796047"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621680796047"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="#local-6989586621680796049"><span class="hs-identifier hs-var">chooseChar62</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796043"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-338"></span><span>
</span><span id="line-339"></span><span>    </span><span class="annot"><a href="#local-6989586621680796049"><span class="hs-identifier hs-type">chooseChar62</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>
</span><span id="line-340"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621680796049"><span class="hs-pragma hs-type">chooseChar62</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-341"></span><span>    </span><span id="local-6989586621680796049"><span class="annot"><span class="annottext">chooseChar62 :: Int -&gt; Char
</span><a href="#local-6989586621680796049"><span class="hs-identifier hs-var hs-var">chooseChar62</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">I#</span></span><span> </span><span id="local-6989586621680796041"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621680796041"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char# -&gt; Char
</span><span class="hs-identifier hs-var">C#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Addr# -&gt; Int# -&gt; Char#
</span><span class="hs-identifier hs-var">indexCharOffAddr#</span></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621680796040"><span class="hs-identifier hs-var">chars62</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621680796041"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-342"></span><span>    </span><span id="local-6989586621680796040"><span class="annot"><span class="annottext">chars62 :: Addr#
</span><a href="#local-6989586621680796040"><span class="hs-identifier hs-var hs-var">chars62</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr#
</span><span class="hs-string">&quot;0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;#</span></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Uniques-prelude]{@Uniques@ for wired-in Prelude things}
*                                                                      *
************************************************************************

Allocation of unique supply characters:
        v,t,u : for renumbering value-, type- and usage- vars.
        B:   builtin
        C-E: pseudo uniques     (used in native-code generator)
        X:   uniques from mkLocalUnique
        _:   unifiable tyvars   (above)
        0-9: prelude things below
             (no numbers left any more..)
        ::   (prelude) parallel array data constructors

        other a-z: lower case chars for unique supplies.  Used so far:

        d       desugarer
        f       AbsC flattener
        g       SimplStg
        k       constraint tuple tycons
        m       constraint tuple datacons
        n       Native codegen
        r       Hsc name cache
        s       simplifier
        z       anonymous sums
-}</span><span>
</span><span id="line-373"></span><span>
</span><span id="line-374"></span><span class="annot"><a href="GHC.Types.Unique.html#mkAlphaTyVarUnique"><span class="hs-identifier hs-type">mkAlphaTyVarUnique</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-375"></span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeClassUnique"><span class="hs-identifier hs-type">mkPreludeClassUnique</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-376"></span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeTyConUnique"><span class="hs-identifier hs-type">mkPreludeTyConUnique</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-377"></span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeDataConUnique"><span class="hs-identifier hs-type">mkPreludeDataConUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-378"></span><span class="annot"><a href="GHC.Types.Unique.html#mkPrimOpIdUnique"><span class="hs-identifier hs-type">mkPrimOpIdUnique</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-379"></span><span class="hs-comment">-- See Note [Primop wrappers] in GHC.Builtin.PrimOps.</span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.Types.Unique.html#mkPrimOpWrapperUnique"><span class="hs-identifier hs-type">mkPrimOpWrapperUnique</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-381"></span><span class="annot"><a href="GHC.Types.Unique.html#mkPreludeMiscIdUnique"><span class="hs-identifier hs-type">mkPreludeMiscIdUnique</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-382"></span><span class="annot"><a href="GHC.Types.Unique.html#mkCoVarUnique"><span class="hs-identifier hs-type">mkCoVarUnique</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span id="mkAlphaTyVarUnique"><span class="annot"><span class="annottext">mkAlphaTyVarUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkAlphaTyVarUnique"><span class="hs-identifier hs-var hs-var">mkAlphaTyVarUnique</span></a></span></span><span>   </span><span id="local-6989586621680796038"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796038"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'1'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796038"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-385"></span><span id="mkCoVarUnique"><span class="annot"><span class="annottext">mkCoVarUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkCoVarUnique"><span class="hs-identifier hs-var hs-var">mkCoVarUnique</span></a></span></span><span>        </span><span id="local-6989586621680796037"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796037"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'g'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796037"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-386"></span><span id="mkPreludeClassUnique"><span class="annot"><span class="annottext">mkPreludeClassUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPreludeClassUnique"><span class="hs-identifier hs-var hs-var">mkPreludeClassUnique</span></a></span></span><span> </span><span id="local-6989586621680796036"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796036"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'2'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796036"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-389"></span><span class="hs-comment">-- Wired-in type constructor keys occupy *two* slots:</span><span>
</span><span id="line-390"></span><span class="hs-comment">--    * u: the TyCon itself</span><span>
</span><span id="line-391"></span><span class="hs-comment">--    * u+1: the TyConRepName of the TyCon</span><span>
</span><span id="line-392"></span><span id="mkPreludeTyConUnique"><span class="annot"><span class="annottext">mkPreludeTyConUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPreludeTyConUnique"><span class="hs-identifier hs-var hs-var">mkPreludeTyConUnique</span></a></span></span><span> </span><span id="local-6989586621680796035"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796035"><span class="hs-identifier hs-var">i</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'3'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796035"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span>
</span><span id="line-394"></span><span class="annot"><a href="GHC.Types.Unique.html#tyConRepNameUnique"><span class="hs-identifier hs-type">tyConRepNameUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-395"></span><span id="tyConRepNameUnique"><span class="annot"><span class="annottext">tyConRepNameUnique :: Unique -&gt; Unique
</span><a href="GHC.Types.Unique.html#tyConRepNameUnique"><span class="hs-identifier hs-var hs-var">tyConRepNameUnique</span></a></span></span><span>  </span><span id="local-6989586621680796033"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796033"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique
</span><a href="GHC.Types.Unique.html#incrUnique"><span class="hs-identifier hs-var">incrUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796033"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-396"></span><span>
</span><span id="line-397"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-398"></span><span class="hs-comment">-- Wired-in data constructor keys occupy *three* slots:</span><span>
</span><span id="line-399"></span><span class="hs-comment">--    * u: the DataCon itself</span><span>
</span><span id="line-400"></span><span class="hs-comment">--    * u+1: its worker Id</span><span>
</span><span id="line-401"></span><span class="hs-comment">--    * u+2: the TyConRepName of the promoted TyCon</span><span>
</span><span id="line-402"></span><span class="hs-comment">-- Prelude data constructors are too simple to need wrappers.</span><span>
</span><span id="line-403"></span><span>
</span><span id="line-404"></span><span id="mkPreludeDataConUnique"><span class="annot"><span class="annottext">mkPreludeDataConUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPreludeDataConUnique"><span class="hs-identifier hs-var hs-var">mkPreludeDataConUnique</span></a></span></span><span> </span><span id="local-6989586621680796032"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796032"><span class="hs-identifier hs-var">i</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'6'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796032"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-comment">-- Must be alphabetic</span><span>
</span><span id="line-405"></span><span>
</span><span id="line-406"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-407"></span><span class="annot"><a href="GHC.Types.Unique.html#dataConTyRepNameUnique"><span class="hs-identifier hs-type">dataConTyRepNameUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#dataConWorkerUnique"><span class="hs-identifier hs-type">dataConWorkerUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-408"></span><span id="dataConWorkerUnique"><span class="annot"><span class="annottext">dataConWorkerUnique :: Unique -&gt; Unique
</span><a href="GHC.Types.Unique.html#dataConWorkerUnique"><span class="hs-identifier hs-var hs-var">dataConWorkerUnique</span></a></span></span><span>  </span><span id="local-6989586621680796031"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796031"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique
</span><a href="GHC.Types.Unique.html#incrUnique"><span class="hs-identifier hs-var">incrUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796031"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-409"></span><span id="dataConTyRepNameUnique"><span class="annot"><span class="annottext">dataConTyRepNameUnique :: Unique -&gt; Unique
</span><a href="GHC.Types.Unique.html#dataConTyRepNameUnique"><span class="hs-identifier hs-var hs-var">dataConTyRepNameUnique</span></a></span></span><span> </span><span id="local-6989586621680796030"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796030"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#stepUnique"><span class="hs-identifier hs-var">stepUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680796030"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span class="hs-comment">--------------------------------------------------</span><span>
</span><span id="line-412"></span><span id="mkPrimOpIdUnique"><span class="annot"><span class="annottext">mkPrimOpIdUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPrimOpIdUnique"><span class="hs-identifier hs-var hs-var">mkPrimOpIdUnique</span></a></span></span><span> </span><span id="local-6989586621680796029"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796029"><span class="hs-identifier hs-var">op</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'9'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796029"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-413"></span><span id="mkPrimOpWrapperUnique"><span class="annot"><span class="annottext">mkPrimOpWrapperUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPrimOpWrapperUnique"><span class="hs-identifier hs-var hs-var">mkPrimOpWrapperUnique</span></a></span></span><span> </span><span id="local-6989586621680796028"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796028"><span class="hs-identifier hs-var">op</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'9'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796028"><span class="hs-identifier hs-var">op</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-414"></span><span id="mkPreludeMiscIdUnique"><span class="annot"><span class="annottext">mkPreludeMiscIdUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPreludeMiscIdUnique"><span class="hs-identifier hs-var hs-var">mkPreludeMiscIdUnique</span></a></span></span><span>  </span><span id="local-6989586621680796027"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796027"><span class="hs-identifier hs-var">i</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796027"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span class="hs-comment">-- The &quot;tyvar uniques&quot; print specially nicely: a, b, c, etc.</span><span>
</span><span id="line-417"></span><span class="hs-comment">-- See pprUnique for details</span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span class="annot"><a href="GHC.Types.Unique.html#initTyVarUnique"><span class="hs-identifier hs-type">initTyVarUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-420"></span><span id="initTyVarUnique"><span class="annot"><span class="annottext">initTyVarUnique :: Unique
</span><a href="GHC.Types.Unique.html#initTyVarUnique"><span class="hs-identifier hs-var hs-var">initTyVarUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'t'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-421"></span><span>
</span><span id="line-422"></span><span class="annot"><a href="GHC.Types.Unique.html#mkPseudoUniqueD"><span class="hs-identifier hs-type">mkPseudoUniqueD</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkPseudoUniqueE"><span class="hs-identifier hs-type">mkPseudoUniqueE</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkPseudoUniqueH"><span class="hs-identifier hs-type">mkPseudoUniqueH</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-423"></span><span>   </span><span class="annot"><a href="GHC.Types.Unique.html#mkBuiltinUnique"><span class="hs-identifier hs-type">mkBuiltinUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-424"></span><span>
</span><span id="line-425"></span><span id="mkBuiltinUnique"><span class="annot"><span class="annottext">mkBuiltinUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkBuiltinUnique"><span class="hs-identifier hs-var hs-var">mkBuiltinUnique</span></a></span></span><span> </span><span id="local-6989586621680796026"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796026"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'B'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796026"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-426"></span><span id="mkPseudoUniqueD"><span class="annot"><span class="annottext">mkPseudoUniqueD :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPseudoUniqueD"><span class="hs-identifier hs-var hs-var">mkPseudoUniqueD</span></a></span></span><span> </span><span id="local-6989586621680796025"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796025"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'D'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796025"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-comment">-- used in NCG for getUnique on RealRegs</span><span>
</span><span id="line-427"></span><span id="mkPseudoUniqueE"><span class="annot"><span class="annottext">mkPseudoUniqueE :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPseudoUniqueE"><span class="hs-identifier hs-var hs-var">mkPseudoUniqueE</span></a></span></span><span> </span><span id="local-6989586621680796024"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796024"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'E'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796024"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-comment">-- used in NCG spiller to create spill VirtualRegs</span><span>
</span><span id="line-428"></span><span id="mkPseudoUniqueH"><span class="annot"><span class="annottext">mkPseudoUniqueH :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPseudoUniqueH"><span class="hs-identifier hs-var hs-var">mkPseudoUniqueH</span></a></span></span><span> </span><span id="local-6989586621680796023"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796023"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'H'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680796023"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-comment">-- used in NCG spiller to create spill VirtualRegs</span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span class="annot"><a href="GHC.Types.Unique.html#mkRegSingleUnique"><span class="hs-identifier hs-type">mkRegSingleUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkRegPairUnique"><span class="hs-identifier hs-type">mkRegPairUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkRegSubUnique"><span class="hs-identifier hs-type">mkRegSubUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkRegClassUnique"><span class="hs-identifier hs-type">mkRegClassUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-431"></span><span id="mkRegSingleUnique"><span class="annot"><span class="annottext">mkRegSingleUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegSingleUnique"><span class="hs-identifier hs-var hs-var">mkRegSingleUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'R'</span></span><span>
</span><span id="line-432"></span><span id="mkRegSubUnique"><span class="annot"><span class="annottext">mkRegSubUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegSubUnique"><span class="hs-identifier hs-var hs-var">mkRegSubUnique</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'S'</span></span><span>
</span><span id="line-433"></span><span id="mkRegPairUnique"><span class="annot"><span class="annottext">mkRegPairUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegPairUnique"><span class="hs-identifier hs-var hs-var">mkRegPairUnique</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'P'</span></span><span>
</span><span id="line-434"></span><span id="mkRegClassUnique"><span class="annot"><span class="annottext">mkRegClassUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegClassUnique"><span class="hs-identifier hs-var hs-var">mkRegClassUnique</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'L'</span></span><span>
</span><span id="line-435"></span><span>
</span><span id="line-436"></span><span class="annot"><a href="GHC.Types.Unique.html#mkCostCentreUnique"><span class="hs-identifier hs-type">mkCostCentreUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-437"></span><span id="mkCostCentreUnique"><span class="annot"><span class="annottext">mkCostCentreUnique :: Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkCostCentreUnique"><span class="hs-identifier hs-var hs-var">mkCostCentreUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'C'</span></span><span>
</span><span id="line-438"></span><span>
</span><span id="line-439"></span><span class="annot"><a href="GHC.Types.Unique.html#mkVarOccUnique"><span class="hs-identifier hs-type">mkVarOccUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkDataOccUnique"><span class="hs-identifier hs-type">mkDataOccUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkTvOccUnique"><span class="hs-identifier hs-type">mkTvOccUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkTcOccUnique"><span class="hs-identifier hs-type">mkTcOccUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-440"></span><span class="hs-comment">-- See Note [The Unique of an OccName] in GHC.Types.Name.Occurrence</span><span>
</span><span id="line-441"></span><span id="mkVarOccUnique"><span class="annot"><span class="annottext">mkVarOccUnique :: FastString -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkVarOccUnique"><span class="hs-identifier hs-var hs-var">mkVarOccUnique</span></a></span></span><span>  </span><span id="local-6989586621680796022"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796022"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'i'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Int
</span><a href="GHC.Data.FastString.html#uniqueOfFS"><span class="hs-identifier hs-var">uniqueOfFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796022"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-442"></span><span id="mkDataOccUnique"><span class="annot"><span class="annottext">mkDataOccUnique :: FastString -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkDataOccUnique"><span class="hs-identifier hs-var hs-var">mkDataOccUnique</span></a></span></span><span> </span><span id="local-6989586621680796021"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796021"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'d'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Int
</span><a href="GHC.Data.FastString.html#uniqueOfFS"><span class="hs-identifier hs-var">uniqueOfFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796021"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-443"></span><span id="mkTvOccUnique"><span class="annot"><span class="annottext">mkTvOccUnique :: FastString -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkTvOccUnique"><span class="hs-identifier hs-var hs-var">mkTvOccUnique</span></a></span></span><span>   </span><span id="local-6989586621680796020"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796020"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'v'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Int
</span><a href="GHC.Data.FastString.html#uniqueOfFS"><span class="hs-identifier hs-var">uniqueOfFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796020"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-444"></span><span id="mkTcOccUnique"><span class="annot"><span class="annottext">mkTcOccUnique :: FastString -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkTcOccUnique"><span class="hs-identifier hs-var hs-var">mkTcOccUnique</span></a></span></span><span>   </span><span id="local-6989586621680796019"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796019"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'c'</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Int
</span><a href="GHC.Data.FastString.html#uniqueOfFS"><span class="hs-identifier hs-var">uniqueOfFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680796019"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span class="annot"><a href="GHC.Types.Unique.html#initExitJoinUnique"><span class="hs-identifier hs-type">initExitJoinUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-447"></span><span id="initExitJoinUnique"><span class="annot"><span class="annottext">initExitJoinUnique :: Unique
</span><a href="GHC.Types.Unique.html#initExitJoinUnique"><span class="hs-identifier hs-var hs-var">initExitJoinUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkUnique"><span class="hs-identifier hs-var">mkUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'s'</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-448"></span><span>
</span><span id="line-449"></span></pre></body></html>